{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "doOoC294Grdq"
   },
   "source": [
    "# **Python 数据科学实用指南**\n",
    "-----\n",
    "\n",
    "## **介绍**\n",
    "\n",
    "本指南探讨了允许你使用 Python 执行数据分析的最佳实践和基础知识。在本指南中，你将学习如何使用 Jupyter notebook 和 Python 库（如 Pandas ， Matplotlib 和 Numpy ）轻松、透明地探索和分析数据集。\n",
    "\n",
    "\n",
    "## **什么是数据科学？**\n",
    "\n",
    "\n",
    "从本质上讲，[数据科学](https://zh.wikipedia.org/wiki/%E6%95%B0%E6%8D%AE%E7%A7%91%E5%AD%A6) 是关于从大量数据中 *提取知识* 来生成信息。这基本上是使用数学和计算机科学等几门学科完成的，如统计学，概率模型，机器学习，数据存储，计算机编程等。\n",
    "\n",
    "欲了解更多信息，我们邀请读者查看 [这本书](https://www.amazon.com/Data-Science-Scratch-Principles-Python/dp/149190142X) .\n",
    "\n",
    "## **先决条件**\n",
    "\n",
    "在参加本指南之前，有必要从 *Python 编程* 开始，我们还将参考 *概率和统计* 的基本概念，以及 *关系代数*\n",
    "\n",
    "## **主要用途**\n",
    "\n",
    "遵循本指南后，读者应熟悉以下任务：\n",
    "\n",
    "\n",
    "* 创建和安装 Python 模块;\n",
    "* 修改和使用 Jupyter notebook ; \n",
    "* 使用 `Matplotlib` 和 `Seaborn` 进行数据可视化; \n",
    "* 使用 `Numpy` 处理表;;\n",
    "* 使用 `Pandas` 处理数据集。.\n",
    "\n",
    "\n",
    "## **指南计划**\n",
    "\n",
    "我们将根据以下计划提出分层内容：\n",
    "\n",
    "\n",
    "\n",
    "1. 设置你的工作环境;\n",
    "2. 开始使用Python; \n",
    "3. 使用Numpy和Matplotlib处理数据; \n",
    "4. 使用Pandas库处理大量数据。\n",
    "\n",
    "让我们开始。\n",
    "\n",
    "### **1. 设置你的工作环境;**\n",
    "\n",
    "为了开始用 Python 分析数据，我们需要有一些背景知识，就像所有其它相关主题一样。现在，我们将尝试解释如何在自己的机器上安装 Jupyter。\n",
    "\n",
    "如果你还没有 Python ，可以使用 [这个方案](https://jupyter.org/install.html) 直接安装 Python ，包括所有必需的库和 Jupyter notebook。\n",
    "一旦安装了 Python ，你将需要安装 Jupyter notebook ，以及以下库： `Pandas`  , `Matplotlib` ,  `Numpy`  和  `SciPy`.\n",
    " \n",
    "\n",
    "在实践中，有两种可能的解决方案来安装 Jupyter notebook 及其必要的库：\n",
    "\n",
    "\n",
    "\n",
    "* 与 Anaconda 发行版一起完全安装; \n",
    "* 单独安装 Jupyter notebook（不含Anaconda）。\n",
    "\n",
    "\n",
    "**1.1. 与 Anaconda 发行版一起完全安装**\n",
    "\n",
    "对于那些从未安装过 Python 的人，建议直接安装 Anaconda 发行版。这是我们将在本节中做的。请注意， Anaconda 是为数据科学开发的 Python 发行版。\n",
    "\n",
    "Anaconda 会安装我们需要的一切，但它可以会安装太多（我们不会使用的库，等等）。你可以在此处 [下载](https://conda.io/en/latest/)  Anaconda 的改进版本。但是，目的是不会自动安装库，尤其是 Jupyter 。因此，这是有经验的用户的解决方案。\n",
    "\n",
    "\n",
    "在 [这个页面](http://docs.anaconda.com/anaconda/install) 你将找到正式的安装说明，以防这些说明不再有效。\n",
    "\n",
    "\n",
    "要在 Windows 或 macOS  上安装 Anaconda ，你必须：\n",
    "\n",
    "*  (1) 下载 [Windows](https://www.anaconda.com/distribution/#windows) 或 [macOS](https://www.anaconda.com/distribution/#macos) 的设置文件，然后双击下载的文件启动它;\n",
    "*   (2) 安装完成后，确保通过执行 Jupyter 程序完成所有操作\n",
    "\n",
    "**1.2. 单独安装 Jupyter notebook（不含Anaconda）**\n",
    "\n",
    "为避免安装 Anaconda ，你可以在安装 Python 后按照以下说明操作：\n",
    "\n",
    "* 检查你的机器上是否安装了 `pip` 。为此，你只需在控制台中键入 `pip` 。通常， pip 与 Python 同时启动。接下来，连续输入这些代码："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 836
    },
    "colab_type": "code",
    "id": "hnMfzYYKG4K2",
    "outputId": "1e213f95-9ed8-4d30-9e5a-1f601bca1f6e"
   },
   "outputs": [],
   "source": [
    "!python -m pip install --upgrade pip    \n",
    "!python -m pip install jupyter"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "S9VuAmUOIgtx"
   },
   "source": [
    "通过在控制台中键入以下命令，你可以验证设置是否正常："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 153
    },
    "colab_type": "code",
    "id": "bhb_k8YdIiEj",
    "outputId": "443f3cbb-b56e-447a-93b4-36ebb2d24834"
   },
   "outputs": [],
   "source": [
    "  !jupyter notebook"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "Zj7YIvGkM3yO"
   },
   "source": [
    "现在你可以创建一个新 notebook 了。\n",
    "\n",
    "\n",
    "* 检查你的计算机上是否安装了 `pip 命令`  。为此，你只需在控制台键入 pip 即可。然后，在控制台中键入以下命令："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 289
    },
    "colab_type": "code",
    "id": "_-wtSmeGM59a",
    "outputId": "c16886e4-4c6e-45bd-d0d8-6adf6c82cd88"
   },
   "outputs": [],
   "source": [
    "   !pip install scipy\n",
    "   !pip install numpy\n",
    "   !pip install matplotlib\n",
    "   !pip install pandas"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "nobVMi-aNEMh"
   },
   "source": [
    "作为替代方案，你现在可以测试 Jupyter ，通过 [此链接](https://jupyter.org/try) 而无需安装任何内容。\n",
    "\n",
    "让我们在 Jupyter notebook 中进行第一次实验：\n",
    "\n",
    "要创建一个新 notebook, 请从主 Jupyter 窗口中单击 `New` 然后再打开 `Python 3`, 如下所示：\n",
    "\n",
    "![创建一个新 notebook](https://i.ibb.co/dWDfrwV/ju1.jpg) \n",
    "\n",
    "在启动 Jupyter 的目录中，通常会创建一个名为 `Untitled.ipynb` 的文件。必须在 `In [ ]` 标签旁边的字段中键入所有Python命令。为此，只需同时键入几条指令即可。甚至可以定义函数。每个单元格中生成的所有变量都可以在 notebook 的所有单元格中访问。完成输入后，按下 `Shift+Enter` 执行它们。\n",
    "\n",
    "要对其进行测试，请键入例如 `2 + 5` 位于窗口中心的空单元格。然后单击此按钮：\n",
    "![Test](https://i.ibb.co/0VQWxHS/2.jpg) \n",
    "\n",
    "### 2.   开始使用 Python\n",
    "\n",
    "在本节中，我们将记住 Python 编程的基础知识。此外，我们不会列出我们需要掌握的所有内容，但我们将模拟整个问题。好吧，我们第一次听说 [蒙提霍尔问题/三门问题（Monty Hall problem）](https://www.montyhallproblem.com/) 。该游戏涉及一个针对竞争对手（玩家）的主持人。该竞争对手位于三个关闭的门前。其中一个门后面有一辆车，其它门后面都是一只山羊。首先，它必须指明一扇门。然后，主持人必须打开一扇门，既不是候选人选择的门，也不是隐藏汽车的门。然后，竞争对手有权打开门，或坚持他最初的选择，或打开第三扇门。\n",
    "\n",
    "首先，让我们在 notebook 中设置我们的工作区："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "_MWPLDtrNOS2"
   },
   "outputs": [],
   "source": [
    "# For displaying graphics in the code sequence, \n",
    "# and not in a separate window:\n",
    "%matplotlib inline\n",
    "\n",
    "# By using the randint function, which generates numbers\n",
    "# whole in a random way:\n",
    "from random import randint, seed\n",
    "\n",
    "# An Enum is a data structure that consists of a \n",
    "# set of appointed elements. This type of variable can be\n",
    "# have as value one of these elements.\n",
    "from enum import Enum\n",
    "\n",
    "# For displaying graphs:\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "nZwquF_zNgwt"
   },
   "source": [
    "可以定义我们的函数。我们将创建一个非常简单的函数。它只代表特定策略的游戏的一部分。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "nvdScfJWNhau"
   },
   "outputs": [],
   "source": [
    "class Strategy(Enum) :\n",
    "    CHANGE = 1\n",
    "    KEEP = 2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "BplRPuL5NkSK"
   },
   "source": [
    "在这里，我们定义了 枚举(Enum) 的子类，它将包含可能的策略。此代码涉及使用面向对象的编程概念，包括类和继承。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "KoOiSdLiNmdw"
   },
   "outputs": [],
   "source": [
    "# Uses the system clock to initialize the generator of \n",
    "# pseudo-random numbers.\n",
    "seed() \n",
    "\n",
    "def Hall_game(strategy) :\n",
    "    ''' Simulates part of the Monty Hall game. This function simulates the participant's choice of door, the elimination of a bad door by the presenter, and the final choice. It only returns the result of the game, because that we will only need the result to perform our calculations.\n",
    "    \n",
    "    Args:\n",
    "        strategy (strategy) : The player's strategy\n",
    "        \n",
    "    Returns:\n",
    "        bool: Has the player won?\n",
    " '''\n",
    "    doors =[0, 1, 2]\n",
    "    \n",
    "    good_door = randint(0,2) \n",
    "    \n",
    "    # Choice of player\n",
    "    first_choice = randint(0,2) \n",
    "    \n",
    "    # We have two doors left\n",
    "    doors.remove(first_choice) \n",
    "    \n",
    "    # The presenter eliminates a door\n",
    "    if first_choice == good_door:\n",
    "        doors.remove(doors[randint(0,1) ]) \n",
    "    else:\n",
    "        doors =[good_door]\n",
    "    \n",
    "    second_choice = 0\n",
    "    # The second choice depends on the strategy\n",
    "    if strategy == Strategy.CHANGE:\n",
    "        second_choice = doors[0]\n",
    "    elif strategy == Strategy.KEEP:\n",
    "        second_choice = first_choice\n",
    "    else:\n",
    "        raise ValueError(\"Strategy not recognized!\") \n",
    "    \n",
    "    return second_choice == good_door"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "SNl8XXn8NtQB"
   },
   "source": [
    "`Randint` 函数返回其两个参数之间的随机整数。例如，randint(0,1) 将返回 0 或 1 。\n",
    "\n",
    "我们现在将测试我们的函数。多次运行下一行以确保结果是随机的。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 299
    },
    "colab_type": "code",
    "id": "nfy76TSTNvXV",
    "outputId": "bba613d8-cdd6-4588-fb08-bdad3d5c4ab5"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "strategy = Strategy.CHANGE\n",
    "Hall_game(strategy) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "GFrftRwlQOSS"
   },
   "source": [
    "在这种情况下，有必要定义一个将一遍又一遍地启动游戏的函数，并返回每个游戏的结果 `list`.\n",
    "\n",
    "为了对这些结果进行计算，我们将不再将它们保留为布尔变量（ True 或 False ），而是根据玩家的胜利（如果他赢了则为 1 ，如果他输了则为 0 ）。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "-9TACrxTQPzj"
   },
   "outputs": [],
   "source": [
    "def Play(strategy, nb_turns) :\n",
    "    '''Simulates a sequence of game turns. This function returns the results of several games of the Monty Hall game in the form of a list of winnings by the player.\n",
    "    \n",
    "    Args:\n",
    "        strategy (strategy) : The player's strategy\n",
    "        nb_turns (int) : Number of revolutions\n",
    "        \n",
    "    Returns:\n",
    "        list: List of players' winnings for each game\n",
    "    '''\n",
    "\n",
    "    return [1 if Hall_game(strategy) else 0 for i in range(nb_turns) ]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "yZU-_k6YQdyx"
   },
   "source": [
    "对于给定数量的游戏（10000），首先需要知道哪种策略对于玩家最有效。我们有一个列表，其中包含最多 1 个玩家赢得的游戏数量。只需要计算此列表中所有项目的总和 `sum function`，即可知道 1 的数量。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 51
    },
    "colab_type": "code",
    "id": "0_BXVfgIQhQZ",
    "outputId": "dbf105d0-fbbb-4866-be6f-e2ab1c953c9c"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "By changing doors, the player has won 6737 on 10,000 games.\n",
      "By keeping his initial choice, the player has won 3441 out of 10,000 games.\n"
     ]
    }
   ],
   "source": [
    "print(\"By changing doors, the player has won {} on 10,000 games.\"\n",
    "      .format(sum(Play(Strategy.CHANGE, 10000) )) )\n",
    "      \n",
    "print(\"By keeping his initial choice, the player has won {} out of 10,000 games.\"\n",
    "      .format(sum(Play(Strategy.KEEP, 10000) )) )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "LTrEp2ELQxf3"
   },
   "source": [
    "### 3.   使用 Numpy 和 Matplotlib 操作数据\n",
    "\n",
    "**3.1. 使用 Numpy 处理数据**\n",
    "\n",
    "本节将重点介绍如何有效地加载，存储和操作数据。它们可以在各种各样的来源中找到，但它们总是可以被视为数字数组。我们将看到一个操纵这些数组的工具： Numpy 。 NumPy（Numerical Python）提供了一个存储和处理数据的接口。Numpy 数组就像 Python 列表，但是 Numpy 可以让事情变得更有效率，，特别是对于更大的数组。\n",
    "\n",
    "让我们从导入Numpy开始："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "zneWztcTQyF5"
   },
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "AJTzKGKdQ1BV"
   },
   "source": [
    "**创建 Numpy 数组**\n",
    "\n",
    "与 Python 列表不同， Numpy 数组只能包含一种类型的成员。有几种方法可以在 Numpy 中创建数组："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 34
    },
    "colab_type": "code",
    "id": "UaOceLg1Q7nP",
    "outputId": "8306ea43-8866-4191-c62e-882ac84e78b6"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Array of integers:\n",
    "np.array([1, 2, 3]) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "KuT4455wQ-6i"
   },
   "source": [
    "如果初始列表中有不同类型的数据，Numpy 将尝试将它们全部转换为最通用的类型。例如，整数 `int` 将转换为 `float` 数字："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 34
    },
    "colab_type": "code",
    "id": "sSMQDcypRDhy",
    "outputId": "5e3d0734-4440-48d2-a679-0cdf23a70a91"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([3.1, 4. , 5. , 6. ])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.array([3.1, 4, 5, 6]) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "zWMIeEjLRElp"
   },
   "source": [
    "作为替代方案，也可以手动设置类型："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 34
    },
    "colab_type": "code",
    "id": "0mZYyk1oRGkE",
    "outputId": "d509cfd2-2d73-4662-99d4-8a299cc70518"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1., 2., 3.], dtype=float32)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.array([1, 2, 3], dtype='float32') "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "M8KjB1MjRJMq"
   },
   "source": [
    "在许多情况下，通过直接创建它们更有效，特别是对于大型数组。 Numpy 有以下几个函数："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 68
    },
    "colab_type": "code",
    "id": "PKSRzj29RMlL",
    "outputId": "3ecdcb7e-a7c3-4619-9a50-6c93f7130602"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1., 0., 0.],\n",
       "       [0., 1., 0.],\n",
       "       [0., 0., 1.]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# An array of length 10, filled with integers that are worth 0\n",
    "np.zeros(10, dtype=int) \n",
    "\n",
    "# A 3x5 size array filled with floating point numbers of value 1\n",
    "np.ones((3, 5) , dtype=float) \n",
    "\n",
    "# A 3x5 table filled with 3.14\n",
    "np.full((3, 5) , 3.14) \n",
    "\n",
    "# A table filled with a linear sequence\n",
    "# starting from 0 and ending from 20, with a step of 2\n",
    "np.arange(0, 20, 2) \n",
    "\n",
    "# A table of 5 values, uniformly spaced between 0 and 1\n",
    "np.linspace(0, 1, 5) \n",
    "\n",
    "# This one you already know! Try also \"randint\" and \"normal\"\n",
    "#np.random((3, 3) )\n",
    "\n",
    "# The identity matrix size 3x3 \n",
    "np.eye(3) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "zLe8-RkmRaZy"
   },
   "source": [
    "**数组属性，索引和切片**\n",
    "\n",
    "每个 Numpy 数组都有一些通常有用的属性。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 85
    },
    "colab_type": "code",
    "id": "ix_cPObPRdFu",
    "outputId": "46a1a17d-1748-4328-f1ef-1a2059f4e522"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dimensions number of x1: 1\n",
      "shape of x1: (6,)\n",
      "size of x1: 6\n",
      "type of x1: int64\n"
     ]
    }
   ],
   "source": [
    "np.random.seed(0) \n",
    "x1 = np.random.randint(10, size=6) # Dimension table 1\n",
    "print(\"dimensions number of x1:\", x1.ndim) \n",
    "print(\"shape of x1:\", x1.shape) \n",
    "print(\"size of x1:\", x1.size) \n",
    "print(\"type of x1:\", x1.dtype) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "QdpuA9SNRgl-"
   },
   "source": [
    "为此，我们经常需要访问数组的一个或多个元素。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 119
    },
    "colab_type": "code",
    "id": "P7AbMQJhRivJ",
    "outputId": "81c5931f-ff87-42af-e8e7-7ce4b27748f3"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[5 0 3 3 7 9]\n",
      "5\n",
      "9\n",
      "5\n",
      "[   5 1000    3    3    7    9]\n",
      "[5 3 3 3 7 9]\n"
     ]
    }
   ],
   "source": [
    "print(x1) \n",
    "\n",
    "# To get access to the first element\n",
    "print(x1[0]) \n",
    "\n",
    "# to get access to the last element\n",
    "print(x1[-1]) \n",
    "\n",
    "x2 = np.random.randint(10, size=(3, 4) ) # Dimension table of 2\n",
    "print(x2[0,1]) \n",
    "\n",
    "# We can also set different values\n",
    "x1[1] = \"1000\"\n",
    "print(x1) \n",
    "\n",
    "x1[1] = 3.14\n",
    "print(x1) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "liX0prIARmVi"
   },
   "source": [
    "我们可以与索引元素相同的方式使用 `[]` ，我们通过组合 `[]` 和 `:` 访问一组元素。语法有一个简单的规则：`x[start:end:step]`。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 68
    },
    "colab_type": "code",
    "id": "PaZYbOG6Rot9",
    "outputId": "c2202130-c3a7-482c-b12b-ce6d57d0fffa"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[5 3 3 3 7]\n",
      "[9]\n",
      "[5 3 7]\n"
     ]
    }
   ],
   "source": [
    "print(x1[:5]) # The first five elements\n",
    "\n",
    "print(x1[5:]) # Elements starting at index 5\n",
    "\n",
    "print(x1[::2]) # One of two elements"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "Poor6AWnRri_"
   },
   "source": [
    "可以连接两个或多个数组："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 34
    },
    "colab_type": "code",
    "id": "hdXtfGdMRtl0",
    "outputId": "f58ec1b8-24ad-427e-a279-3764c5dd01b8"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 3, 2, 1])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = np.array([1, 2, 3]) \n",
    "y = np.array([3, 2, 1]) \n",
    "np.concatenate([x, y]) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "HcMlwxroRw1a"
   },
   "source": [
    "到目前为止，我们已经看到了 Numpy 数组上非常基本的东西。从这里开始，我们将看到是什么让 Numpy 变得非常重要。 Python 的基准实现（也称为 CPython ）非常灵活，但这种灵活性使其无法使用所有可能的优化。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 34
    },
    "colab_type": "code",
    "id": "SVunc4lGRy8K",
    "outputId": "42f550af-baf4-40f9-e58f-586fe49d4c7c"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.11111111 0.5        0.16666667 0.11111111 0.2       ]\n"
     ]
    }
   ],
   "source": [
    "def reverse_calculation(values) :\n",
    "    output = np.empty(len(values) )\n",
    "    for i in range(len(values) ):\n",
    "        output[i] = 1.0 / values[i]\n",
    "    return output\n",
    "        \n",
    "values = np.random.randint(1, 10, size=5) \n",
    "print(reverse_calculation(values) )\n",
    "\n",
    "wide_array = np.random.randint(1, 100, size=1000000) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "Qyo3lqRMR15u"
   },
   "source": [
    "我们现在提供此类操作的总览："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 119
    },
    "colab_type": "code",
    "id": "mIwFRfWcR4He",
    "outputId": "87c423c3-5af1-4447-e840-be0528b6f3c5"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x = [0 1 2 3]\n",
      "x + 5 = [5 6 7 8]\n",
      "x - 5 = [-5 -4 -3 -2]\n",
      "x * 2 = [0 2 4 6]\n",
      "x / 2 = [0.  0.5 1.  1.5]\n",
      "x // 2 = [0 0 1 1]\n"
     ]
    }
   ],
   "source": [
    "# First of all, there are simple mathematical operations\n",
    "x = np.arange(4) \n",
    "print(\"x =\", x) \n",
    "print(\"x + 5 =\", x + 5) \n",
    "print(\"x - 5 =\", x - 5) \n",
    "print(\"x * 2 =\", x * 2) \n",
    "print(\"x / 2 =\", x / 2) \n",
    "print(\"x // 2 =\", x // 2) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "gOhq-mtQR_Rk"
   },
   "source": [
    "或者，你也可以在 Numpy 数组上调用函数，甚至在 Python 列表上调用函数。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 68
    },
    "colab_type": "code",
    "id": "xYL_PAT5SBNg",
    "outputId": "1c7de189-e9de-4a8b-ffdd-8f4881bb58f2"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Absolute value: [6 3 2 5]\n",
      "Exponential: [2.47875218e-03 4.97870684e-02 7.38905610e+00 1.48413159e+02]\n",
      "Logarithm: [1.79175947 1.09861229 0.69314718 1.60943791]\n"
     ]
    }
   ],
   "source": [
    "x = [-6, -3, 2, 5]\n",
    "print(\"Absolute value:\", np.abs(x) )\n",
    "print(\"Exponential:\", np.exp(x) )\n",
    "print(\"Logarithm:\", np.log(np.abs(x) )) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "r_HOMXA0SK7B"
   },
   "source": [
    "你还可以在数组上执行布尔运算："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 85
    },
    "colab_type": "code",
    "id": "z5PuqE6-SNaO",
    "outputId": "43c29e4f-4a3b-4389-bc71-7f1def033eb4"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ True,  True, False,  True],\n",
       "       [ True, False, False, False],\n",
       "       [False, False, False, False],\n",
       "       [False,  True, False, False]])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = np.random.rand(4,4) \n",
    "x > 0.7"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "XG99GF20SQTb"
   },
   "source": [
    "Numpy 有在它的数组上对这些数据的求和函数："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 34
    },
    "colab_type": "code",
    "id": "lgbTOOL4SSeK",
    "outputId": "8817aecd-3f69-4675-ea87-34cda2928a45"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4.698357490059848"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "L = np.random.random(10) \n",
    "np.sum(L) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "g6gzsAFDSWYn"
   },
   "source": [
    "**3.2. 使用 Matplotlib 处理数据**\n",
    "\n",
    "创建 Matplotlib 是为了直接从 Python 生成图形。在本节中，我们将重点放在使用 Matplotlib 作为 Jupyter notebook 中的可视化工具。\n",
    "\n",
    "要开始这个过程，我们设置工作区："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "YEWMt8RPSZY2"
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "plt.style.use('seaborn-whitegrid') \n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "zezABqrkScrf"
   },
   "source": [
    "让我们首先检查一个简单的案例，绘制一个 `sin` 函数的曲线："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 265
    },
    "colab_type": "code",
    "id": "uccZjDF_Seo4",
    "outputId": "0486a3bf-3ecf-4967-b9e1-d23747ba82b8"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD0CAYAAAB+WlaPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl0U2X+P/B3tqZtku77Bm2h0IUCLZtgKwIti6AMezuUARxGHTeUQRx10IN8Wfwe/TrqgAqI/KpAQXQEZUdokZ1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KQknDhxAnPmzAHDMFi1ahXbIZnd559/jlu3bmHdunVYt24dgI4HOfbyUNIePPnkkzh37hxmzJgBhmGwfPlyzj97mT9/Pt566y2kpqZCq9Xitddeg7OzM9thWcSyZcvwr3/9Cx999BHCwsIwfvx4k5yXZrwSQgiHcaK7hhBCSPcoyRNCCIdRkieEEA6jJE8IIRxGSZ4QQjiMkjwhhHAYJXlCCOEwSvKEEMJh/x8kitAopYmbTwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure() \n",
    "ax = plt.axes() \n",
    "x = np.linspace(0, 10, 1000) \n",
    "ax.plot(x, np.sin(x) );"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "7IqEfDb4Si5P"
   },
   "source": [
    "`fig` 变量是指包含所有项目（轴，标签，数据等）的容器。轴与上面显示的方形匹配，然后将包含图形中的数据。\n",
    "\n",
    "在离散数据集（点）的情况下，我们经常使用误差线来表示每个点的不确定性，以确定其准确值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 265
    },
    "colab_type": "code",
    "id": "09iO8hbDSluo",
    "outputId": "51ef4bbb-e7ed-40a1-92ba-42e9661951fd"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD0CAYAAACLpN0/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3W1sU9f9B/BvHhxI4jRWeaomlgYyKBkIhTCVooqSQisqWgYrxJCsCYIIjWpVS5/p47oSQQubNIFKB6UgijpEoFJFX2yMUjLUNg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vn147bXXAADff/89/H4/RowYYXKqtPn5z3+Oo0ePAgCOHDmCX/ziFyanSJ2WlhacOnUKANDR0YGJEyeanKLMXLp0CcuXL8fTTz+NRYsWARD3mCTLi6jH5f3338eWLVsAAMXFxcjLy8OkSZMMOS5CDSzq7+Xyz3/+E4qiYO3ataiqqjI7War09vbiueeew7fffou8vDw89dRTqK2tNTtZWfv666/xxBNPoK2tDefOncNLL72EcDiMsWPHorW1FQUFBWYnMSOx+ejq6sKaNWvgcDgwfPhwrFmzJq6pz6paW1vx17/+FWPHjo1+9sILL6C1tVW4Y5IsL6tWrcKGDRuEOy7BYBDPPfccLl26hOvXr2PFihWoqqoy5FoRKqATEdHghGpyISKiwTGgExFJggGdiEgSDOhERJJgQCcikgQDOhGRJBjQiYgkwYBORCSJ/wMj3nyCEpTVfQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.linspace(0, 30, 80) \n",
    "dy = 0.3\n",
    "y = np.sin(x) + dy * np.random.randn(80) \n",
    "\n",
    "plt.errorbar(x, y, yerr=dy, fmt='.k') ;"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "P5RZ30ScSoWM"
   },
   "source": [
    "### 4.   使用 Pandas 库处理大量数据\n",
    "\n",
    "\n",
    "Pandas 库是 Python 中数据科学的基本库之一。 Pandas 提供易于使用且功能强大的数据结构以及快速使用它们的方法。在本节中，我们将讨论 Pandas 库感兴趣的内容，以及该库主要对象的基本操作 `Dataframe`.\n",
    "\n",
    "这个 pandas 可以用 numpy 数组表示："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 34
    },
    "colab_type": "code",
    "id": "1tzoSgueSrA6",
    "outputId": "ae0af486-a14d-42f7-fd5e-e214dd21d8e1"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([200,  50, 100,  80])"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "panda_numpy = np.array([200,50,100,80]) \n",
    "panda_numpy"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "h92pbZcLSuFS"
   },
   "source": [
    "可以这样做："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "BjkfVMrsSwCx"
   },
   "outputs": [],
   "source": [
    "family = [\n",
    "    np.array([100, 5, 20, 80]) , # mom \n",
    "    np.array([50, 2.5, 10, 40]) , # baby \n",
    "    np.array([110, 6, 22, 80]) , # daddy \n",
    "]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "ftbgk7TbSz1O"
   },
   "source": [
    "让我们使用 Pandas 表示 `family`："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 142
    },
    "colab_type": "code",
    "id": "pJDW2v14S1vd",
    "outputId": "67323e32-7806-4625-ea54-59d5a16a057c"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>80.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>50.0</td>\n",
       "      <td>2.5</td>\n",
       "      <td>10.0</td>\n",
       "      <td>40.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>110.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>80.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       0    1     2     3\n",
       "0  100.0  5.0  20.0  80.0\n",
       "1   50.0  2.5  10.0  40.0\n",
       "2  110.0  6.0  22.0  80.0"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "family_df = pd.DataFrame(family) \n",
    "family_df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "WBTvQb0ES7mN"
   },
   "source": [
    "可用于表示数组的对象是 `DataFrame` 对象\n",
    "\n",
    "实际上，通过指定列名和行名，我们可以做得更好："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 142
    },
    "colab_type": "code",
    "id": "wNwohKggS-ha",
    "outputId": "4b09b61d-8f2b-4b49-b7f0-19455fb7db4d"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>legs</th>\n",
       "      <th>hair</th>\n",
       "      <th>hands</th>\n",
       "      <th>belly</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>mom</th>\n",
       "      <td>100.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>80.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>baby</th>\n",
       "      <td>50.0</td>\n",
       "      <td>2.5</td>\n",
       "      <td>10.0</td>\n",
       "      <td>40.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>dad</th>\n",
       "      <td>110.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>80.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       legs  hair  hands  belly\n",
       "mom   100.0   5.0   20.0   80.0\n",
       "baby   50.0   2.5   10.0   40.0\n",
       "dad   110.0   6.0   22.0   80.0"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "family_df = pd.DataFrame(family,\n",
    "                                index = ['mom','baby','dad'],\n",
    "                                columns = ['legs','hair','hands','belly']) \n",
    "family_df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "VINRsHjhTMAU"
   },
   "source": [
    "以下是 Dataframes 的一些小功能。首先，访问我们数组的 belly 列。有两种可能的语法，它们返回完全相同的结果："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 85
    },
    "colab_type": "code",
    "id": "NhtOaX-CTOOv",
    "outputId": "39ccf429-5fb3-497a-ab6b-54f46788b760"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "mom     80.0\n",
       "baby    40.0\n",
       "dad     80.0\n",
       "Name: belly, dtype: float64"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "family_df.belly\n",
    "family_df[\"belly\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "_fBmFYgMTREr"
   },
   "source": [
    "我们现在将逐个看到整个系列，通过 `iterrows` 返回一个元组作为其第一个元素的元组索引和行的内容："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 323
    },
    "colab_type": "code",
    "id": "Z9BIOR9WTTkH",
    "outputId": "b75f5bde-5f08-463b-8e6b-c003676d0249",
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Family:  mom :\n",
      "legs     100.0\n",
      "hair       5.0\n",
      "hands     20.0\n",
      "belly     80.0\n",
      "Name: mom, dtype: float64\n",
      "Family:  baby :\n",
      "legs     50.0\n",
      "hair      2.5\n",
      "hands    10.0\n",
      "belly    40.0\n",
      "Name: baby, dtype: float64\n",
      "Family:  dad :\n",
      "legs     110.0\n",
      "hair       6.0\n",
      "hands     22.0\n",
      "belly     80.0\n",
      "Name: dad, dtype: float64\n"
     ]
    }
   ],
   "source": [
    "for ind, content in family_df.iterrows() :\n",
    "    print(\"Family:  %s :\" % ind) \n",
    "    print(content) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Create a CSV file called dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 34
    },
    "colab_type": "code",
    "id": "H9eHMwNST868",
    "outputId": "e8ca042a-8ce0-4256-ebc8-8727490382fd"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Overwriting dataset.csv\n"
     ]
    }
   ],
   "source": [
    "%%writefile dataset.csv\n",
    "\n",
    "John,Doe,120 jefferson st.,Riverside, NJ, 08075\n",
    "Jack,McGinnis,220 hobo Av.,Phila, PA,09119\n",
    "\"John \"\"Da Man\"\"\",Repici,120 Jefferson St.,Riverside, NJ,08075\n",
    "Stephen,Tyler,\"7452 Terrace \"\"At the Plaza\"\" road\",SomeTown,SD, 91234\n",
    ",Blankman,,SomeTown, SD, 00298\n",
    "\"Joan \"\"the bone\"\", Anne\",Jet,\"9th, at Terrace plc\",Desert City,CO,00123"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "ntXXjrp9TXA_"
   },
   "source": [
    "Pandas 库是指向数组操作的指针。因此，可以使用 Pandas 读取 CSV 文件：从 CSV 创建数据框只需要一行："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "rVirXOQdTZPy"
   },
   "outputs": [],
   "source": [
    "data = pd.read_csv(\"dataset.csv\", sep=\";\") "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "mbop7pxoTjGa"
   },
   "source": [
    "* `data` 变量现在包含一个包含 csv 文件数据的数据帧；\n",
    "* 我们的CSV文件中的值由符号分隔 `;` ；\n",
    "* 默认情况下， `pd.read_csv` 期望以逗号分隔的值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>John,Doe,120 jefferson st.,Riverside, NJ, 08075</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Jack,McGinnis,220 hobo Av.,Phila, PA,09119</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>John \"Da Man\",Repici,120 Jefferson St.,Riversi...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Stephen,Tyler,\"7452 Terrace \"\"At the Plaza\"\" r...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>,Blankman,,SomeTown, SD, 00298</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Joan \"the bone\", Anne,Jet,\"9th, at Terrace plc...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     John,Doe,120 jefferson st.,Riverside, NJ, 08075\n",
       "0         Jack,McGinnis,220 hobo Av.,Phila, PA,09119\n",
       "1  John \"Da Man\",Repici,120 Jefferson St.,Riversi...\n",
       "2  Stephen,Tyler,\"7452 Terrace \"\"At the Plaza\"\" r...\n",
       "3                     ,Blankman,,SomeTown, SD, 00298\n",
       "4  Joan \"the bone\", Anne,Jet,\"9th, at Terrace plc..."
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  }
 ],
 "metadata": {
  "colab": {
   "collapsed_sections": [],
   "name": "PythonDataScience",
   "provenance": [],
   "toc_visible": true,
   "version": "0.3.2"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
